#ifndef _TIMER_H_
#define _TIMER_H_

#include "EngineApi.h"

class ENGINE_API Timer
{
public:
	static void		Start();	//va en el star del BaseGame
	static void		Measure();	//va en Loop de BaseGame, al final del while
	static float	GetDT();	//delta T
	static int		GetFPS();	//a los FPS en lo que corre
	static void		SetLockFPS(float fps);

private:
	static float		_fTimeBetweenFrames;
	static float		_MeasureFpsSample;
	static int			_iFPS;
	static long int		_IFrameCounter;
	static float		_lockFps;
	static float		_accum;

	static LARGE_INTEGER _performanceCount1;
	static LARGE_INTEGER _performanceCount2;
	static LARGE_INTEGER _frequency;
};

#endif // _TIMER_H_